Skip to main content

All Questions

0votes
1answer
1kviews

Shell script that prompts user for arguments and inserts them as parameters into a python script

I am trying to write a shell script that prompts the user for 3 case-sensitive arguments username password url and then take those parameters and calls a python script i.e.: "python streamcount....
Nick O'Neil's user avatar
0votes
4answers
2kviews

Using two variables to form a single text file

I am trying to create a text file with below content user name is ${name} and his mobile number is ${number} I have 10 users and 10 mobile numbers as well. User names are saved in user.txt and the ...
Raj R's user avatar
1vote
1answer
1kviews

Keep a Python script with parameters running, restart if crashed, in a tmux session

I have a Python script which runs in multiple instances with different parameters, for instance: python3 proc.py -s -v -l proc_one.log python3 proc.py -c -v -l proc_two.log I usually start these in ...
boolean.is.null's user avatar
0votes
2answers
1kviews

How to run a python cmd inside a bash cmd over ssh

When I run the following in my bash terminal, it works fine. $ bash -c "python -c \"print 'helloworld'\"" ---> helloworld However when I try to do this over ssh, it give me nothing, can someone help ...
KN Nguyen's user avatar
3votes
2answers
23kviews

busybox shell script - unknown operand error message

I need to write a small shell script that will execute a python script and get the results. When I try to run it this way it works: #!/bin/sh /usr/bin/python /etc/scripts/backup.py result=$? if [ $...
dot's user avatar
  • 735
0votes
1answer
254views

Where is pdfwriter.py located?

Hello I am starting to learn scripting and I was following the instructions in this link (Converting a txt to pdf with python's pdfrw). Link here: https://www.cyberciti.biz/faq/unix-howto-read-line-by-...
dareToDiffer07's user avatar
1vote
2answers
2kviews

How can I run this python script on all html files under a directory? [duplicate]

I have a python script $ cat ~/script.py import sys from lxml import etree from lxml.html import parse doc = parse(sys.argv[1]) title = doc.find('//title') title.text = span2.text.strip() print etree....
Brian Fitzpatrick's user avatar
0votes
2answers
884views

shell or python script to transpose rows to columns [duplicate]

I have a big file with numbers like: 1 2 3 4 5 6 7 8 9 9 9 9 I want to tranpose it into 1 5 9 2 6 9 3 7 9 4 8 9 I have search on google for solutions, but those solutions simply don't work ...
user3401853's user avatar
4votes
1answer
2kviews

How Can I Automate the Change between a Python Script and a Nohup Python Script?

I have a Raspberry Pi connected to a digital temperature probe, which measures my fermenting beer. A python script reads the temperature every second and prints it to the console, and stores it in a ...
Matthew Moisen's user avatar
1vote
2answers
2kviews

What scripting language or platform to use for web page downloads and screen interaction?

Possible Duplicate: Does anybody here have experience in automating some tasks in web applications using curl? Here is what I need to do? Wondering what platform is most suited - easy to ...
jim70's user avatar

close